Trying to change the references to pointer