function purchase(uint256 _drug_id) public payable {
    require(gameOpen == true);
    Drug storage drug = drugs[_drug_id];

    require(drug.owner != msg.sender);
    require(msg.sender != address(0));  
    require(msg.value >= drug.price);

    uint256 excess = SafeMath.sub(msg.value, drug.price);
    uint256 half_diff = SafeMath.div(SafeMath.sub(drug.price, drug.last_price), 2);
    uint256 reward = SafeMath.add(half_diff, drug.last_price);
  
    lastBuyer[1].send(uint256(SafeMath.mul(SafeMath.div(half_diff, 100), 69))); 
    lastBuyer[6].send(uint256(SafeMath.mul(SafeMath.div(half_diff, 100), 2)));  
    lastBuyer[9].send(uint256(SafeMath.mul(SafeMath.div(half_diff, 100), 2)));  

    if(drug.owner == address(this)){
      ceoAddress.send(reward);
    } else {
      drug.owner.send(reward);
    }
    
    
    drug.last_price = drug.price;
    address _old_owner = drug.owner;
    
    if(drug.price < 1690000000000000000){ 
        drug.price = SafeMath.mul(SafeMath.div(drug.price, 100), 169); 
    } else {
        drug.price = SafeMath.mul(SafeMath.div(drug.price, 100), 125); 
    }
    drug.owner = msg.sender;

    lastBuyer[9] = lastBuyer[8];
    lastBuyer[8] = lastBuyer[7];
    lastBuyer[7] = lastBuyer[6];
    lastBuyer[6] = lastBuyer[5];
    lastBuyer[5] = lastBuyer[4];
    lastBuyer[4] = lastBuyer[3];
    lastBuyer[3] = lastBuyer[2];
    lastBuyer[2] = lastBuyer[1];
    lastBuyer[1] = msg.sender;

    Transfer(_old_owner, drug.owner, _drug_id);
    TokenSold(_drug_id, drug.last_price, drug.price, _old_owner, drug.owner, drug.name);

    msg.sender.send(excess);
  }