add bag implementation