working destroy function for challenge