added support for types or tags (instead only tags) for quantity_transfer algorithm