refactor to use expected_as_array