rewrite mins-key