whoops, accidentally pushed when not ready.  fixed some bugs in previous commit