sort_dir and sort_dirs isn't used anywhere