working on multithreading the loading process