rearranging digits