Changed multithread to singlethread