function refund() external inCancelledList inRefundPeriod {  
    require(mainCancelledList[msg.sender]);  
    require((mainContribution[msg.sender] > 0) && token.balanceOf(msg.sender)>0);
	uint256 presaleContribution = zcc.viewContribution(msg.sender);
    uint256 refundBalance = (mainContribution[msg.sender]).add(presaleContribution) ;
    uint256 preSaleRefundTemp= tempMngr.viewPreSaleRefunds(msg.sender);
    uint256 preSaleRefundMain=presaleContribution.sub(preSaleRefundTemp);
    refundBalance=refundBalance.sub(preSaleRefundTemp);
    refundBalance=refundBalance.sub(preSaleRefundsInMainSale[msg.sender]);
    preSaleRefundsInMainSale[msg.sender]=preSaleRefundMain;
    
    mainContribution[msg.sender] = 0;
	token.burn(msg.sender);
    msg.sender.transfer(refundBalance); 
	Refund(msg.sender,refundBalance);
  }