state management and scaling