build and unbuild paths using transactions.