finished up imu handling (untested!)