refactoring fs