Update hi3.g

Handles many new edge cases