catch response from server