changing pointer to reference