refactored huge Row#check_for_gaps method