reorganizing codes