add listener for input from accelerometer