refactored ArrayTest