Implemented the clone() method.