fixing up parsing