working on correctly generating the files (split is not working)