added function generation. variable length argument is not supported yet.