function updateAd(string message, string url) public payable {
		
		require(msg.value >= adPriceWeek);
		require(block.timestamp > purchaseTimestamp.add(purchaseSeconds));

		
		if (msg.value >= adPriceMonth) {
			purchaseSeconds = 2592000; 
		} else {
			purchaseSeconds = 604800; 
		}

		adMessage = message;
		adUrl = url;

		purchaseTimestamp = block.timestamp;

		emit newAd(msg.sender, msg.value, adMessage, adUrl, purchaseSeconds, purchaseTimestamp);
	}