adding get_next_block to TEmplateBuilding