fixes to unit tests
fixes to unit tests
fixes #95. empty arrays handled