Added equals function to pointer