parses the string into variables