private void UpdateDisplay(CounterType counterType)
 {
     // get the display if it exists
     if (displays.TryGetValue(counterType, out CounterDisplay display))
     {
         if (counterList.CounterMap.TryGetValue(counterType, out int amount))
         {
             display.gameObject.SetActive(true);
             display.SetText(amount); // if a display exists and there is an amount for it then set the display to the amount
         }
         else
         {
             // A display exists but no amount so set the display to inactive
             display.SetText(0);
             display.gameObject.SetActive(false);
             UpdateDisplayLocations();
         }
     }
     else
     {
         // no display exists so create a new one
         CounterDisplay newDisplay = Instantiate(counterDisplayPrefab, transform);
         displays.Add(counterType, newDisplay);
         newDisplay.SetBackgroundColor(Counters.GetData(counterType).FillColor);
         newDisplay.SetBorderColor(Counters.GetData(counterType).BorderColor);
         newDisplay.SetTextColor(Counters.GetData(counterType).BorderColor);
         newDisplay.SetText(counterList.AmountOf(counterType));
         UpdateDisplayLocations();
     }
 }