Made it multi threaded.