added functions for reading the gyroscope