refactoring and detect_hole is set by default