Updating the object to string function