We will need to keep refering to this in various places, especially while implementing scale up/down, so I'm moving it to a helper function.
We will need to keep refering to this in various places, especially while implementing scale up/down, so I'm moving it to a helper function.