implement clone-for