added code for device motion, which also includes orientation data