fixed and documented shrink. added lots of tests.