refactoring + store files (untested)
refactoring + file storage