vectorizing local tests