add thread for lua