refactor block replacement code out of Updater class