modify test cases + training data + fix bug in function predict