use threads instead of processes, reduce memory usage