fixed typos in functions