First implementation of Bag