def ask_for_int(message, max=1000000000):
    """
    support function to ask users for an integer
    to use in place of regular input() method
    ---
    message: string asking the user for an integer
    returns i: user input integer
    """
    while True:
        i = input(message)
        try:
            i = int(i)
            if i <= max:
                return i
            else:
                print("please enter and integer less than or equal to " + str(max))
        except:
            print("please enter an integer")