Implemented different search algorithm