rankall function finished