first somewhat working version of my NDArray implementation (doesn't pass tests yet)