added zrank method and tests.