more rewriting. note everything is in flux [ci skip]