rearranged file loading