added some more checking, added some unit tests.  Discovered that python doesn't overflow bitshifts