ikmodel.setrobot no longer works
reorganizing more code