Including threads to speed up the process