reponse handling corrected