modified post-processing script