response undefined issue