improve MDIIS method