reordering code