made parser correctly parse a string into tokens