added a thread for the wifi