refactoring configuration structure so it will be cleaner