write a program to make data auto. and add function to find overlap.