method checkoverlap