HOW DOES A BIDIRECTIONAL INVERTER WORK