improved modularity and implement MPI-io