added generic clone functions