typos in function generation