update to have more robust response handlers