functions for ranking creation