def pgcd(a, b):
    """return the highest common divisor of two positive integers
    Method of sequential substractions
    """
    sentenceerror = '%s,%s must be positive integers' % (str(a), str(b))
    if not isinstance(a, int) or not isinstance(b, int):
        raise TypeError(sentenceerror)
    if a <= 0 or b <= 0:
        raise TypeError(sentenceerror)
    while a != b:
        if a < b:
            a, b = b, a
        a, b = a - b, b
    return a
