would be nicer to name the variable documentReference rather than just reference and add a comment to explain why we need to extract the Document reference from the passed entity reference.