fixed a bug in main and sensor data order