Implement destroy function