added some function in thread