Logic for trash button