preparation for multithreaded approach