Search function Edited