Working on modifying the gapped extension to work like the gapped extension in the C++ code.
Updated the hasBadWindow function