diff --git a/cck_list.module b/cck_list.module
index 664e948..db77da6 100755
--- a/cck_list.module
+++ b/cck_list.module
@@ -126,10 +126,31 @@ function theme_cck_list_formatter($element) {
    
   if (!empty($value)) {
     
-    $lines = explode("\n", $value);
-    $lines = array_map('trim', $lines);
-    $lines = array_filter($lines, 'strlen');
-    if (count($lines) > 0) {
+    $flatArray = explode("\n", $value);
+    $flatArray = array_map('trim', $flatArray);
+    //get rid of any blank lines
+    $flatArray = array_filter($flatArray, 'strlen');
+    
+    //Security risk
+    //$flatArray = check_plain($flatArray);
+
+    //for each hypen (-) it will get nested
+    $nestedArray = array();
+    foreach ($flatArray as $key => $line) {
+      $current = &$nestedArray;
+      if (preg_match('/^[-]+/', $line, $matches)) {
+        $level = drupal_strlen($matches[0]);
+        while ($level > 0) {
+          $line = drupal_substr($line, 1);
+          $last = &$current[count($current) - 1];
+          $current = &$last['children'];
+          --$level;
+        }
+      }
+      $current[] = array($line);
+    }
+    
+    if (count($nestedArray) > 0) {
       $attributes = array();
 
       if (!empty($field['css_id'])) {
@@ -138,8 +159,7 @@ function theme_cck_list_formatter($element) {
       if (!empty($field['css_class'])) {
         $attributes['class'] = $field['css_class'];
       }
-
-      return theme('item_list',$lines, NULL, $type, $attributes);
+      return theme('item_list',$nestedArray, NULL, $type, $attributes);
     }
   }
 }
