minor changes in mainThread