Patch voting

- finished writing
- TODO: check correctness