where is the thermostat located. the radiator fans will not turn on. on 2003 Mazda Mazda6

i connected them direct to the battery and they kicked on. i disconnected the temperature censor unit and they turned on. the temperature gauge reads in the middle. it will not go any higher, but the water boils out from the reservoir. i am thinking the thermostat is stuck and will not let water through. i am stuck on this. please help.

Asked by for the 2003 Mazda Mazda6