Developed algorithm

basic search function algorithm developed.