renamed variable 'base_dir' to 'original_dir'