deleted unnecessary server registration thread code