public V remove(K key) {
	int index = compFunction(key.hashCode());
	if (buckets[index] == null || buckets[index].isEmpty()) {
	    return null;
	} else {
	    DLinkedListNode current = (DLinkedListNode)(buckets[index].front());
	    while (current.isValidNode()) {
		try {
		    if (((Entry)(current.item())).key().equals(key)) {
			Entry entry = (Entry)(current.item());
			current.remove();
			this.size--;
			if (((double)(size) / buckets.length) <= 0.25) {
			    resize(0.5);
			}
			return (V)(entry.value);
		    }
		    current = (DLinkedListNode)(current.next());
		}
		catch (InvalidNodeException ex) {
		    return null;
		}
	    }
	    return null;
	}
    }