func: function purchaseSharesOfArtwork(uint256 artworkId) public payable {
  
  		
  		require(msg.sender == tx.origin);
  
  		require(_exists(artworkId));
  		Artwork storage artwork = _artworks[artworkId];
  
  		
  		
  		require(msg.sender != artwork._owner);
  
  		uint256 totalShares;
  		uint256[3] memory prices;
  		( , , , prices, totalShares, , ) = getArtwork(artworkId);
  		uint256 currentPrice = prices[1];
  
  		
  		require(msg.value >= currentPrice);
  
  		
  		uint256 purchaseExcess = msg.value - currentPrice;
  		if (purchaseExcess > 0)
  			msg.sender.transfer(purchaseExcess);
  
  		
  		
  		for (uint256 i = 0; i < artwork._shareholders.length; i++) {
  			address shareholder = artwork._shareholders[i];
  			if (shareholder != address(this)) { 
  				shareholder.transfer((currentPrice * artwork._shares[shareholder]) / totalShares);
  			}
  		}
  
  		
  		if (!artwork._hasShares[msg.sender]) {
  			artwork._hasShares[msg.sender] = true;
  			artwork._shareholders.push(msg.sender);
  		}
  
  		artwork._purchases++; 
  		artwork._shares[msg.sender] += artwork._purchases; 
  		artwork._shares[artwork._owner] = artwork._purchases + 1; 
  
  		ArtworkSharesPurchased(artworkId, artwork._title, msg.sender, artwork._purchases);
  		
  	}