added update balance table to updateBalance function