response logic