added response code conditions