Created new util function extendClone