fixing bug in response pattern