added timeout to the urlopen call