rewrite some tests with arrays