added State tracking system so that we can later save the result's state in the server for saving/forking purposes