added work item and threadpool to main implementation