connected thread and handler - work in progress