refactor generator function indicator