Rearranging entry code