before deleting wind function