fix buggy test runner
test rank by ttapscp
refactor ranking methods