add linked bag implementation