controller response logic