Added ranking functionality