implemented transfer function for MPI_Comm_rank
minor changes