changing reference uses to pointer uses