Function clone is now complete and working