function setReferer(address a) private {
        if (a != msg.sender) {
            address addr = affiliates[msg.sender];
            if (addr == address(0)) {
                affiliates[msg.sender] = a;
            }
        }
    }