static boolean isThereAFour(Hand hand) {
     for (int z =0; z < hand.size();z++)
     {int count = 0; 
      for(int y=0;y < hand.size();y++)
            {
                 if (hand.get(z).getValue() == hand.get(y).getValue())
                 count++;
                 if (count == 4)
                 return true; // four of a kind
            }}   
return false;
}