some rearranging