rewrite test, sort of, to fix the errors