refactor classify and add forest-ranking