updated example code, replaced run() on threads with start()