add correlate.c and search.c