add tests and documentation for clone feature