merge procee and thread