added inner limit for detecting near misses