added processing thread and writing to COM on button click