change the order of codes