more lazy-repair algorithm stuffs