added support for duality