start to add Clone functionality to polycode