some changes in mainThread