ndarray version seems to be working now