refacto for setup and configure phases