compute paths and destinations from the piece