added response parsing