Make option to switch between single and multithreaded