function setReferral(bytes32 _code) public {
        require(referralCodeOwners(_code) != address(0), "no referral with this code");
        require(referrals(msg.sender) == address(0), "referral is already set");
        address referrer = referralCodeOwners(_code);
        require(referrer != msg.sender, "Can not invite yourself");
        refs[msg.sender] = referrer;
        emit SetReferral(msg.sender, referrer);
    }