added magnetometer reading