change for search

done some little tweaks to make it work