added structured clone algorithm