globalized patterns_dir variable