how does a contactor work