Updated for soft delete