adding generator methods