notes on bag operations