dup() and set() for models