add local search function, fixed bug with click to item