changed Accelerometer so the SensorEventListener is implemented in the class creating an instance of Accelerometer