add setlocal to avoid polluting environment