changes to parsing method