added additional support for unlabeled samples