def collectInfo(check, contents):
    """
    If the contents come from an extension of the congressional record,
    this function will collect the information of the speech's speaker

    :param check: int indicating the first spot to check for the speaker in contents
    :param contents: String containing the speech and the information of the speaker
    :return: List containing the information of the speaker, more specifically, the
                [name of the speaker, state of the speaker,
                    chamber that the speech was given in, date the speech was given]
    """

    # initializes all of the variables we want to return
    date = ""
    speaker = ""
    chamber = ""
    state = ""

    lines = 0  # maintains the number of lines we have parsed thus far. Only want to look at odd lines
    temp = 0  # maintains the end of the line we want to look at
    while check >= 0:

        # gathers the information that we want to return
        if contents[check] == "\n":  # only looks at new lines so that we only check lines where new information occurs
            lines += 1  # updates the number of lines we look at
            if lines % 2 == 0:  # accounts for the double line break between lines
                temp = check
            if lines == 3:
                date = contents[check:temp]  # assigns the date the speech was made
            if lines == 5:
                chamber = contents[check:temp].replace("in the ", "")  # assigns the chamber the speech was made in
            if lines == 7:
                state = contents[check:temp].replace("of ", "")  # assigns the state that the speaker is from
            if lines == 9:
                speaker = contents[check:temp].replace("HON. ", "")  # assigns the name of the speaker
                break
        check -= 1  # updates the location of that we want to check in contents

    return [speaker, state, chamber, date]