refactoring setup methods