fs refactoring