create thread by extending the class thread