I prefer this version. The other version would require handling the unsupervised case twice.