public String[] ranges(String text) {
		if (!checkLowercase(text)) {
			return null;
		}

		char[] textArray = text.toCharArray();
		QuickSort.sort(textArray, 0, textArray.length - 1);
		textArray = String.valueOf(textArray).trim().toCharArray();
		textArray = removeDuplicate(textArray); 
		String result = "";

		for (int i = 0; i < textArray.length; i++) {

			char start = textArray[i];
			char tmp = start;
			// System.out.println("start:" + start);
			int charIndex = 0;
			while (i < textArray.length && tmp == textArray[i]) {
				i++;
				tmp++;
				charIndex++;
			} 

			if (start == tmp - 1) {
				String add = start + ":" + start;
				if (result.length() == 0) {
					result = add;
				} else {
					result = result + "," + add;
				}
			} else if (start + charIndex == tmp) {
				tmp = (char) (tmp - 1);
				String add = start + ":" + tmp;
				if (result.length() == 0) {
					result = add;
				} else {
					result = result + "," + add;
				}
			}
			i--;
		} 
		return result.split(",");

	}