altering to account for multiple uses of reference