refactored initial setup state a bit