piggy: added code for gyroscope