add options for threads and memory