added ToQuantity formatting support