set up object, can add numbers and arrays and can count number of elements. trying to flatten the array when an array is added