How To List Rooms (PUN 2)

Hi guys , I need to list the romos in my lobby scene.
For now, this is the code I’ve used but I don’t know why it isnt working. This is the correct way?

 public override void OnRoomListUpdate(List<RoomInfo> roomList)
    {
        print(roomList.Count + " Rooms");
        base.OnRoomListUpdate(roomList);
        foreach (var Item in roomList)
        {
            RoomName = Item.Name;
            PlayerAmount = Item.PlayerCount;
            MaxPlayers = Item.MaxPlayers;
            PhotonNetwork.Instantiate("RoomPrefab", transform.position, transform.rotation);
            RoomPrefab.transform.Find("RoomName").GetComponent<Text>().text = RoomName;
            RoomPrefab.transform.Find("PlayerInt").GetComponent<Text>().text = PlayerAmount.ToString();
            if(MaxPlayers == 4)
            {
                GameObject.Find("IPlayerA").GetComponent<Image>().sprite = Four;
            }
            else if (MaxPlayers == 2)
            {
                GameObject.Find("IPlayerA").GetComponent<Image>().sprite = Two;
            }
            else if (MaxPlayers == 3)
            {
                GameObject.Find("IPlayerA").GetComponent<Image>().sprite = Three;
            }
            RoomPrefab.transform.SetParent(ScrollView.transform, false);
        }
    }

The OnRoomListUpdate method is called when you successfully join a lobby. So, you have to call PhotonNetwork.JoinLobby() first.