Added more functionality to return ONLY valid strings