Add methods and test for invalid input