first parameter of search() is now an object, fix for #2