update, delete and balance calculation