added overlaps function