added Threads (still need to be adapted)