public static String run(String input, int length, int filter)
  {
    StringBuilder sb = new StringBuilder();
    NaiveSuffixTree myTree = new NaiveSuffixTree();
    input += "$";
    final BaseCalculator myBaseCalculator = new BaseCalculator(input);
    Node root = myTree.createTree(input);

    ArrayList<Entry<String, Integer>> list = new ArrayList<Entry<String, Integer>>(
        myTree.findMaxRepeats(root, length, 2, new String()).entrySet());

    Collections.sort(list, new Comparator<Entry<String, Integer>>()
    {

      @Override
      public int compare(Entry<String, Integer> arg1,
          Entry<String, Integer> arg0)
      {
        return (int) (arg0.getValue()
            / myBaseCalculator.expectedOccurences(arg0.getKey()) - arg1
            .getValue() / myBaseCalculator.expectedOccurences(arg1.getKey()));
      }
    });

    for (Entry<String, Integer> entry : list)
    {
      // System.out.println(myBaseCalculator.expectedOccurences(entry.getKey()));
      // System.out.println(entry.getValue());
      // System.out.println(entry.getKey());
      // System.out.println(entry.getValue()
      // / myBaseCalculator.expectedOccurences(entry.getKey()));
      //
      if (entry.getValue()
          / myBaseCalculator.expectedOccurences(entry.getKey()) >= filter)
      {
        sb.append(entry.getKey()
            + "\n"
            + entry.getValue()
            + "\n"
            + round(myBaseCalculator.expectedOccurences(entry.getKey()), 2)
            + "\n"
            + round(
                entry.getValue()
                    / myBaseCalculator.expectedOccurences(entry.getKey()), 2)
            + "\n@\n");
        //TODO
        //Super repetitive work!!
        sb.append(myTree.findSequence(entry.getKey(), root) + "\n\n");
      }

    }

    return sb.toString();
  }