implemented intersection command