refactor signal