finally got dup work correctly