complete to replace Thread class.