ranking functionality implemented