learning class and test implemented