simplified code generation in makefun