added multicore and MPI support
added support for intermediately gathering states
Adding the multicore