set up the response function
fixed merge conflict