added delete methods in deinit