basics for multithreading have been added