slight update/optimization to SlotsNeeded