added partial function generator