utils: finished rewriting match_stars, ref #93