allow to set allowdupe
fix typo
make the require explicit via include
new style for 2.7