public Node removeMin()
	{
		Node z = min;

		if (z != null)
		{
			int numKids = z.degree;
			Node x = z.child;
			Node tempRight;

			// for each child of z do...
			while (numKids > 0)
			{
				tempRight = x.right;

				// remove x from child list
				x.left.right = x.right;
				x.right.left = x.left;

				// add x to root list of heap
				x.left = min;
				x.right = min.right;
				min.right = x;
				x.right.left = x;

				// set parent[x] to null
				x.parent = null;
				x = tempRight;
				numKids--;
			}

			// remove z from root list of heap
			z.left.right = z.right;
			z.right.left = z.left;

			if (z == z.right)
			{
				min = null;
			}
			else
			{
				min = z.right;
				consolidate();
			}

			// decrement size of heap
			size--;
		}

		return z;
	}