refactoring setup