add marginal node distribution code with failing test