Added the option to change threads