made parsing response a little better