Trying to add devicemotion handler