updated string logic implemented