changing order of codes