Extending thread class and using thread methods