edit query of rank to match the doc & add team rank :3