added is_hole() and detect_hole option