added beginning of auto-scaling