added clone() method for all languages