consolidated overlapping code into one post processing prefix function