push post processing into functions