Use threading.Thread for flexibility