function dissmisPurse(uint purseId) {
    Purse p = purses[purseId];
    if (p.creator != msg.sender || (p.status != 1 && p.status != 4)) { throw; }
    bool success = true;
    for (uint i=0; i<p.numContributions; i++) {
      Contribution c = p.contributions[i];
      if(!c.refunded) {
        c.refunded = c.sender.send(c.value);
      }
      success = success && c.refunded;
    }
    p.status = success ? 3 : 4;
  }