add function for overlapping