add thread for application