search function

added search.c
added search.h