improved tests. Added general dd algo - for determining minimum change that causes transition from pass to fail (doesn't work right yet)