update rank endpoint to use RankResponse struct