arrange the code sequence