added definition of aggregator and fleshed out Theta_in/out.