added support for dup