added support for bag