reordering bits of layout