accelerometer stuff added