Nearly finished the update functionality