fixed intersection distance, refactored example