Finalized odom code