some progress on testing front. It runs. I have to figure out how to make assertEqual work with numpy arrays