modified parse_past