improving the array class