Using Li-ion batteries in UPS applications