Changing the way thread is invoked