added input option for multithreading