Modified Procsim.cpp