change main function and correct typo in the function name