Added random chars and GetNumberofRepetitionsCharacter