cleans up parsing