J. adding updated version of IMU code