function AvailableForWithdrawal(uint256 _id) public view
        returns (uint256 id, address user, address tokenAddress, uint256 amount, uint256 amountbalance, uint256 lastwithdraw, uint256 availableforwithdrawal)
    {
        Safe storage s = _safes[_id];
		
			uint256 timeframe  			= now - s.lasttime;
			uint256 maxtimeframe 		= timeframe / seconds30days;
			
			if (maxtimeframe >= 3) { 	
			uint256 timeframeaccumulation = 3; 
			}
			else {
			timeframeaccumulation = maxtimeframe; 
			}
			
			uint256 calcwithdrawamount 	= s.amount * s.percentage / 100 * timeframeaccumulation ;  

			if (calcwithdrawamount >= s.amountbalance) {
			uint256 withdrawamount = s.amountbalance; 
			}
			else {
			withdrawamount = calcwithdrawamount; 
			}
		
        return(s.id, s.user, s.tokenAddress, s.amount, s.amountbalance, s.lasttime, withdrawamount);
    }