refactor generator strategy