Modified the overlap script