refact with localstorage search test