removed the necessity of num_files