arrange all the codes