(work in progress) replacing blocks with xrefs