refactor arraypass