extended array

bug fixes to array and more tests