one black from the thermo and one black from the switch go to power, then the other black from thermo and switch go to the black on the motor. white from motor goes to white from power and ground the thermo case. the switch is wired in parallel with the thermo so you can just press the switch to check the motor if the thermo isn't calling for the fan to be on.