changed searchItem to local var