refactoring. less stateful components