cleanup copy method