input error handling implemented - Tests Pass