made string checking more flexible, hopefully