working on multithreading prototype