Modified from pointer to reference