Added number of threads as command line option