added code for post-processing simulation