Updated so that each thread gets its own JobContext instance