refactor Accelerometer becomes object