Rearranged codes