changed interface of threads