public void deleteElement(String value) throws NotExist{
        ListElement previous = head;
        ListElement current = head.next();
        if (previous.getValue().equals(value)) {
            head = head.next();
            count--;
        } else {
            while (current != tail.next()) {
                if (current.getValue().equals(value)) {
                    ListElement help = current.next();
                    previous.connectNext(help);
                    previous = help;
                    current = help.next();
                    count--;
                } else {
                    previous = current;
                    current = current.next();
                }
            }
        }
    }