working on get_motion_codes