How is the work done to hoist the counterweight related to the potential energy of the counterweight at its specified height?