I tried to speed up the execution by using threads