diff --git a/wwwroot/inc/functions.php b/wwwroot/inc/functions.php
index f56b473..edb72a3 100644
--- a/wwwroot/inc/functions.php
+++ b/wwwroot/inc/functions.php
@@ -2305,11 +2305,13 @@ function constructIPAddress ($ip_bin)
 function iptree_embed (&$node, $pfx)
 {
 	$self = __FUNCTION__;
+	echo "$self (${node['ip']}/${node['mask']}, ${pfx['ip']}/${pfx['mask']}): ";
 
 	// hit?
 	if (0 == IPNetworkCmp ($node, $pfx))
 	{
 		$node = $pfx;
+		echo "\n";
 		return;
 	}
 	if ($node['mask'] == $pfx['mask'])
@@ -2318,14 +2320,21 @@ function iptree_embed (&$node, $pfx)
 	// split?
 	if (!isset ($node['right']))
 	{
+		echo "split ";
 		$node['left']  = constructIPRange ($node['ip_bin'], $node['mask'] + 1);
 		$node['right'] = constructIPRange (ip_last ($node), $node['mask'] + 1);
 	}
 
 	if (IPNetContainsOrEqual ($node['left'], $pfx))
+	{
+		echo "left\n";
 		$self ($node['left'], $pfx);
+	}
 	elseif (IPNetContainsOrEqual ($node['right'], $pfx))
+	{
+		echo "right\n";
 		$self ($node['right'], $pfx);
+	}
 	else
 		throw new RackTablesError ('cannot decide between left and right', RackTablesError::INTERNAL);
 }
