moar bounds checking
more tests!
fixup