functioning delete and soft delete