first fully working version of data file loading