use signals instead of arrays