saving sensor data, updates in flow of program