more rewriting. code compiles