typos in function