squash some bugs. now we pass 2/3 unit tests