added function to download img