typo in function generator