public void deleteNode(T deleteItem){
        LinkedListNode<T> current; 
        LinkedListNode<T> trailCurrent; 
        boolean found;

        if ( first == null)    //the list is empty
            System.err.println("Cannot delete from an empty "
                             + "list.");
        else{
            if (first.info.equals(deleteItem)){
                first = first.link;

                if (first == null)  //the list had only one node
                 	last = null;
              	count--;
            }else{
                found = false;
                trailCurrent = first; 
                current = first.link; 

                while (current != null && !found){
                    if (current.info.equals(deleteItem))
                        found = true;
                    else{
                        trailCurrent = current;
                        current = current.link;
                    }
                }

                if (found){ //if found, delete the node
                    count--;
                    trailCurrent.link = current.link;

                    if (last == current)  
                       last = trailCurrent;  
                }
                else
                   System.out.println("Item to be deleted is "
                                    + "not in the list.");
            }
        }
    }