added distinct array test
fixes #394