respond logic