extract holeResultsInject to function