removed printing code from the function generator