convex function generator added