implements insertBag method