added co_hole_check
changed comment
refactoring and made pep-8 compliant