add tests around cloning functions