destroy_all function