added accounting on closing