refactor of files