All the important parts of the clothes washer are known to be electrically controlled, including the inner drum, the valves, the pump, and the heating element. Start by putting your clothes in the machine and detergent either in the machine itself or in a tray up above, then set the program you want and switch on the power and the programmer opens the water valves so hot and cold water enter the machine and fill up the outer and inner drums. The water usually enters at the top and trickles down through the detergent tray, washing any soap there into the machine, the programmer switches off the water valves. The thermostat measures the temperature of the incoming water, when the water is hot enough, the programmer makes the drum rotate back and forth, sloshing the clothes through the soapy water. Then the detergent pulls the dirt from your clothes and traps it in the water. The programmer then opens a valve so the water drains from the drums after that it opens the valve again and the clean water goes in, then the programmer makes the drum rotate back and forth so the clean water rinses the clothes and when the clothes are rinsed, the programmer makes the drum rotate at really high speed of around 80 mph (130 km/h) and finally the pump removes any remaining water and the wash cycle comes to an end, the clothes now are ready for hanging.