added -flattenedArray, with documentation and tests
updated readme