added test cases for bad input