update loan function