adding date search function