added support for dup method