first implementation of the semisupervised scheme