func: function () payable {
          require(state == State.PreICO || state == State.Crowdsale);
          require(now < crowdsaleFinishTime);
          uint valueWei = msg.value;
          uint valueUSD = valueWei * etherPrice / 1000000000000000000;
          if (collectedUSD + valueUSD > totalLimitUSD) { 
              valueUSD = totalLimitUSD - collectedUSD;
              valueWei = valueUSD * 1000000000000000000 / etherPrice;
              require(msg.sender.call.gas(3000000).value(msg.value - valueWei)());
              collectedUSD = totalLimitUSD; 
          } else {
              collectedUSD += valueUSD;
          }
          mintTokens(msg.sender, valueUSD, valueWei);
      }