integrate population simulation and write script for code profiling