bag abstractions and test refactoring
debugging
more conditions safely handled