i want you to finsih this code with no elisions import tkinter as tk
from tkinter import ttk

# Constants and Data Structures
# 2024 Tax Brackets for different filing statuses
TAX_BRACKETS_2024 = {
    "Single": [
        (0, 10275, 0.10),
        (10276, 41775, 0.12),
        (41776, 89075, 0.22),
        (89076, 170050, 0.24),
        (170051, 215950, 0.32),
        (215951, 539900, 0.35),
        (539901, float('inf'), 0.37)
    ],
    "Married Filing Jointly": [
        (0, 20550, 0.10),
        (20551, 83550, 0.12),
        (83551, 178150, 0.22),
        (178151, 340100, 0.24),
        (340101, 431900, 0.32),
        (431901, 647850, 0.35),
        (647851, float('inf'), 0.37)
    ],
    "Head of Household": [
        (0, 14650, 0.10),
        (14651, 55900, 0.12),
        (55901, 89050, 0.22),
        (89051, 170050, 0.24),
        (170051, 215950, 0.32),
        (215951, 539900, 0.35),
        (539901, float('inf'), 0.37)
    ]
    # Add more filing statuses and their tax brackets as needed
}

STATE_TAX_RATES = {
    "CA": 0.093,  # California
    "MA": 0.05,   # Massachusetts
    "NY": 0.065,  # New York
    "TX": 0.00,   # Texas (No state income tax)
    "FL": 0.00,   # Florida (No state income tax)
    # Add more states here
}

# Calculation Functions
def calculate_federal_tax(income, filing_status):
    """Calculates the federal tax owed based on income and filing status."""
    tax_owed = 0
    brackets = TAX_BRACKETS_2024.get(filing_status)
    if not brackets:
        raise ValueError(f"Invalid filing status: {filing_status}")

    for lower, upper, rate in brackets:
        if income > lower:
            taxable_amount = min(income, upper) - lower
            tax_owed += taxable_amount * rate
    return tax_owed

def calculate_state_tax(state, biweekly_gross):
    """Calculates the state tax owed based on the provided state and biweekly gross income."""
    return biweekly_gross * STATE_TAX_RATES.get(state, 0)

def calculate_fica_tax(biweekly_gross):
    """Calculates the FICA tax owed based on the provided biweekly gross income."""
    return biweekly_gross * 0.0765

# GUI Update and Calculation Logic
def calculate_pay():
    """Calculates and updates the GUI with pay information based on user input."""
    global hourly_rate_entry, state_var, filing_status_var

    try:
        hourly_rate = float(hourly_rate_entry.get())
        state = state_var.get()
        filing_status = filing_status_var.get()

        weekly_gross = hourly_rate * 40
        biweekly_gross = weekly_gross * 2
        annual_income = biweekly_gross * 26

        federal_tax_annual = calculate_federal_tax(annual_income, filing_status)
        federal_tax_biweekly = federal_tax_annual / 26

        state_tax_biweekly = calculate_state_tax(state, biweekly_gross)
        fica_tax_biweekly = calculate_fica_tax(biweekly_gross)

        biweekly_net = biweekly_gross - federal_tax_biweekly - state_tax_biweekly - fica_tax_biweekly
        weekly_net = biweekly_net / 2

        update_labels(weekly_gross, biweekly_gross, federal_tax_biweekly, state_tax_biweekly, fica_tax_biweekly, weekly_net, biweekly_net)

    except ValueError:
        result_label.config(text="Invalid input. Please enter a numeric hourly rate.")

def update_labels(weekly_gross, biweekly_gross, federal_tax_biweekly, state_tax_biweekly, fica_tax_biweekly, weekly_net, biweekly_net):
    """Updates the GUI labels with the calculated pay information."""
    weekly_gross_label.config(text=f"Weekly Gross: ${weekly_gross:.2f}")
    biweekly_gross_label.config(text=f"Biweekly Gross: ${biweekly_gross:.2f}")

    weekly_tax_label.config(text=f"Weekly Taxes: ${(federal_tax_biweekly + state_tax_biweekly + fica_tax_biweekly) / 2:.2f}")
    biweekly_tax_label.config(text=f"Biweekly Taxes: ${federal_tax_biweekly + state_tax_biweekly + fica_tax_biweekly:.2f}")

    weekly_net_label.config(text=f"Weekly Net: ${weekly_net:.2f}")
    biweekly_net_label.config(text=f"Biweekly Net: ${biweekly_net:.2f}")

def reset_fields():
    """Resets the input fields and labels to their initial values."""
    hourly_rate_entry.delete(0, tk.END)
    state_combobox.set("CA")
    filing_status_combobox.set("Single") 
    update_labels(0, 0, 0, 0, 0, 0, 0)

# GUI Setup
window = tk.Tk()
window.title("Pay Calculator")

# Widgets setup
hourly_rate_label = ttk.Label(window, text="Hourly Rate:")
hourly_rate_label.grid(row=0, column=0, padx=10, pady=10)

hourly_rate_entry = ttk.Entry(window)
hourly_rate_entry.grid(row=0, column=1, padx=10, pady=10)

state_var = tk.StringVar(value="CA")  # Default state is California
state_label = ttk.Label(window, text="State:")
state_label.grid(row=1, column=0, padx=10, pady=10)

state_combobox = ttk.Combobox(window, textvariable=state_var, values=list(STATE_TAX_RATES.keys()))
state_combobox.grid(row=1, column=1, padx=10, pady=10)

# Filing Status Dropdown
filing_status_var = tk.StringVar(value="Single")
filing_status_label = ttk.Label(window, text="Filing Status:")
filing_status_label.grid(row=2, column=0, padx=10, pady=10)

filing_status_combobox = ttk.Combobox(window, textvariable=filing_status_var, values=list(TAX_BRACKETS_2024.keys()))
filing_status_combobox.grid(row=2, column=1, padx=10, pady=10)

calculate_button = ttk.Button(window, text="Calculate", command=calculate_pay)
calculate_button.grid(row=3, column=0, columnspan=2, padx=10, pady=10)

reset_button = ttk.Button(window, text="Reset", command=reset_fields)
reset_button.grid(row=4, column=0, columnspan=2, padx=10, pady=10)

result_label = ttk.Label(window, text="")
result_label.grid(row=