modular function for intials setup