determines response