Added destroy() function