rankorder implementation and starting unittestint