implementation of cloneDeep

see #455