def versionCompare(v1, v2):
    """Method to compare two versions.
    Return 1 if v2 is smaller,
    -1 if v1 is smaller,
    0 if equal
    """

    if "freedom" in v1:
        return 1
    
    else:

        v1_list = v1.split(".")[:3]
        v2_list = v2.split(".")[:3]
        i = 0
        while (i < len(v1_list)):

            # v2 > v1
            if int(v2_list[i]) > int(v1_list[i]):
                return -1
            # v1 > v1
            if int(v1_list[i]) > int(v2_list[i]):
                return 1
            i += 1
        # v2 == v1
        return 0