add rank in model, controller and index view