added handling of using the test flag
added method to test the classifiers accuracy