public void createHuffTree()
	{
		while(items > 2)
		{
			Node first = removeFirst();
			Node second = removeFirst();
			
			Node newNode = new Node(first.frequency + second.frequency, -1);
			newNode.left = first;
			newNode.right = second;
			first.next = first.prev = second.next = second.prev = null;
			insert(newNode);
		}
		
		Node first = removeFirst();
		Node second = root;
		
		Node newNode = new Node(first.frequency + second.frequency, -1);
		newNode.left = first;
		newNode.right = second;

		root = newNode;
	}