improved string detection.