Finished potential's update function.