added proper response checking