Hooked up destroy function