refactors setup