Possible version of process sim - rough code