new version with the limit on the string fixed