changing script to download data and then use it