some work on rewriting error messages