adding test and fixing string checks