Added valid example code setting array properly