Refactor step 3 - moved repeated calls to endpoint_precursor.