added a prompt to ask for the number of threads