library Fee {

    using SafeMath for uint;

    struct fee {
        uint num;
        uint den;
    }

    /*
    * @dev Splits given value to two parts: tax itself and taxed value
    */
    function split(fee memory f, uint value) internal pure returns (uint tax, uint taxed_value) {
        if (value == 0) {
            return (0, 0);
        }
        tax = value.mul(f.num) / f.den;
        taxed_value = value.sub(tax);
    }

    /*
    * @dev Returns only tax part
    */
    function get_tax(fee memory f, uint value) internal pure returns (uint tax) {
        if (value == 0) {
            return 0;
        }
        tax = value.mul(f.num) / f.den;
    }
}
function get_tax(fee memory f, uint value) internal pure returns (uint tax) {
        if (value == 0) {
            return 0;
        }
        tax = value.mul(f.num) / f.den;
    }
/*
 * @dev Returns only tax part
 */