rewrite ha_minimal