Begin to add destroy function