extract_overlap function

extract overlap