Accept redundant code at RandomSearch

functionize and subscript doesn't work well...