Implementation of Then & Agg