reduce to a single node case for debugging
rewrite alphas and betas as functions instead of lambdas