add read_all_files function