add parseString method to parse from a string instead of just a file pointer