interface x2 implemented in naive bayes