function isEnded (uint256 pid) public view returns(bool) {
        if (pid > getCurrentVoting()) {
            return false;
        } else if (block.timestamp >= proposals[pid].end_time) {
            return true;
        }
        return false;
    }