use queue to prevent tkinter from crashing