function updateAd(uint256 id) public payable {
		
		require(msg.value >= adPriceMultiple.mul(adPriceHour));
		require(block.timestamp > purchaseTimestamp + purchaseSeconds);
		require(id > 0);

		
		if (msg.value >= adPriceMultiple.mul(adPriceWeek)) {
			purchaseSeconds = 604800; 
		} else if (msg.value >= adPriceMultiple.mul(adPriceDay)) {
			purchaseSeconds = 86400; 
		} else if (msg.value >= adPriceMultiple.mul(adPriceHalfDay)) {
			purchaseSeconds = 43200; 
		} else {
			purchaseSeconds = 3600; 
		}

		
		purchaseTimestamp = block.timestamp;
		
		lastOwner.transfer(msg.value.div(2));
		
		theInvestor.transfer(msg.value.div(10));
		
		lastOwner = msg.sender;
		
		dappId = id;
	}