function unvote(uint _idPoll) public {
        require(_idPoll < _polls.length, "Invalid _idPoll");

        Poll storage p = _polls[_idPoll];
        
        require(block.number >= p.startBlock && block.timestamp < p.endTime && !p.canceled, "Poll is inactive");

        if(p.voters == 0) return;

        uint prevVotes = 0;
        for(uint8 i = 0; i < p.numBallots; i++){
            uint ballotAmount = p.ballots[i][msg.sender];

            prevVotes += ballotAmount;
            p.ballots[i][msg.sender] = 0;

            if(ballotAmount != 0){
                p.qvResults[i] -= sqrt(ballotAmount / 1 ether);
                p.results[i] -= ballotAmount;
                p.votersByBallot[i]--;
            }
        }

        if(prevVotes != 0){
            p.voters--;
        }

        emit Unvote(_idPoll, msg.sender);
    }