improved is_hole()