optimize parse loop for strings