refactor to use a block iterating approach

Also enables the failing 3 test cases, since those are now passing