rework parsing, need to update tests