search now works properly