added degenerate case of empty array []
0.1.1