added circuit for ups with charger