improve method getCapacityOverTime