change utility templates to return reference