better response code validation