add mpi,resize code,store key