The solution to draining deep mines was found by Thomas Newcomen who developed an "atmospheric" engine that also worked on the vacuum principle. It employed a cylinder containing a movable piston connected by a chain to one end of a rocking beam that worked a mechanical lift pump from its opposite end. At the bottom of each stroke, steam was allowed to enter the cylinder below the piston. As the piston rose within the cylinder, drawn upward by a counterbalance, it drew in steam at atmospheric pressure. At the top of the stroke the steam valve was closed, and cold water was briefly injected into the cylinder as a means of cooling the steam. This water condensed the steam and created a partial vacuum below the piston. The atmospheric pressure outside the engine was then greater than the pressure within the cylinder, thereby pushing the piston into the cylinder. The piston, attached to a chain and in turn attached to one end of the "rocking beam", pulled down the end of the beam, lifting the opposite end of the beam. Hence, the pump deep in the mine attached to opposite end of the beam via ropes and chains was driven. The pump pushed, rather than pulled the column of water upward, hence it could lift water any distance. Once the piston was at the bottom, the cycle repeated.