fixed typo of function