added check and test for empty string