added magnetometer