last code with numpy ndarray data structure.. will change it in next release