use reference with value of the pointer, avoid wild pointer.