Added template code for showing rank.