rearranging paths