updated destroy logic