add edges for hidden nodes #158