completed the close account function with update balance table code