implemented analize_dir method