added spec for invalid input