clean up array diff algorithm
minor tweak
unit test pass