implemented patterns_dir
implemented pattern_path