macro script to build a block representation of a page + necessary functions in the toolkit