First close the ball valve for the input and the ball valve for the output. Next open the brass "hose bib valve" to expel water out of the filter, make sure to open the vent screw on the filter lid to allow that to happen. The filter will now be clear of water. After you have installed a new filter, attach the lid, close the brass valve, open the two ball valves and when water spurts out of the vent screw, close it.