updated response function

minor fix