some changes to load_dir and sew