overlaps function fixed