updated with Aarons way of parsing