Handle received data