change destroy_cv method