reshaped respond function