add timeout to speedtest function