added "clone" in dElement and replace mode in dAppend