adding overlap logic