Changed rank page to make database query