How does class AB amplifier work?