added clone code