integration tests -- and fix zero-indexing bug that integration tests uncovered!