added sort to loading of files