Rectify lack of coherence issues in this paragraph:
The external ends of the pili adhere to a solid substrate, either the surface to which the bacterium is attached or to other bacteria. When the pili contract, they pull the bacterium forward like a grappling hook.
The external ends of the pili adhere to a solid substrate, either the surface to which the bacterium is attached or to other bacteria. Then, when the pili contract, they pull the bacterium forward like a grappling hook.