fixed bug in function generator