rearranging some bits