Added an option to take in number of threads