why change reference to pointer?