clean up response logic