compute paths