he swung his body like a pendulum and gained some momentum , finally enabling himself to swing up to the prow of the ship , distancing himself from erin enough to give him room to wrap his leg around one side of the bow while he pulled himself up onto the deck .