update search logic, can search for time interval correctly
merge