@Override
    public int compareTo(Todo other) {
        boolean thisCompleted = isCompleted();
        boolean thisMsdOnly = isMsd();
        boolean thisDueDate = !thisMsdOnly && !thisCompleted;
        boolean otherCompleted = other.isCompleted();
        boolean otherMsdOnly = other.isMsd();
        boolean otherDueDate = !otherMsdOnly && !otherCompleted;

        //TODO: this need priority as well...

        if (thisDueDate) {
            if (otherDueDate) {
                return Integer.compare(this.getDueDays(), other.getDueDays());
            } else {
                return -1; // otherMsd, otherCompleted
            }
        } else if (thisMsdOnly) {
            if (otherDueDate) {
                return 1;
            } else if (otherMsdOnly) {
                return toString().compareTo(other.toString());
            } else { // otherCompleted
                return -1;
            }
        } else { // if (thisCompleted)
            if (otherCompleted) {
                return toString().compareTo(other.toString());
            } else {
                return 1;
            }
        }
    }