added passing initialContext to thread implementation