code names fixed. removed hard coded number of threads