Added ranking calculation