modified changes to MyThread