small changes to parsing