bag implementation
add test case to bag