Added search algorithm, check facebook for details