Fix typos: rename funtion to function