refactored so generator function works with low power machines