new version of test and self-learning works almost fine