project09 checking input errors