make function generator

it fails with division by zero