Downloading photo function added