implement response functionality