update and sort MiKey