add cloning support

Change-Id: I669aef52a913ebbca6be2d0c099574b2bd783de6