added multicore and MPI support
added support for intermediately gathering states