typo in function