rewrite to single aggregate pr processor style