use np.save to improve the performence