change permissions and added accelerometer