You slice here on the ```array``` and not the pre-cast ```data``` ... is that what you meant to do ?