remove duplicate generator function