Add documentation to vote function