added iOS accelerometer code
fixed merge issues