refactoring filesystem