added test for invalid string