Finish the function of updating a paper