narrow gate detection