added tests and a copy method.