Added threads and -h argument