change pointer to reference