done the validate response function