function imageData = downloadOnlyImages(B4URL)

pkg load image

B2URL = strrep(B4URL,"B04.jp2","B02.jp2");
B3URL = strrep(B4URL,"B04.jp2","B03.jp2");
B4URL = strrep(B4URL,"B04.jp2","B04.jp2");
B5URL = strrep(B4URL,"B04.jp2","B05.jp2");
B8URL = strrep(B4URL,"B04.jp2","B08.jp2");
B12URL = strrep(B4URL,"B04.jp2","B12.jp2");
TCIURL = strrep(B4URL,"B04.jp2","TCI.jp2");
%download images
%wait_t = randi(10)
%pause(wait_t)
try
        urlwrite(B2URL, 'Tile_B02.jp2');
	wait_t = randi(5)
pause(wait_t)
	urlwrite(B3URL, 'Tile_B03.jp2');
	wait_t = randi(5)
pause(wait_t)
	urlwrite(B4URL, 'Tile_B04.jp2');
	wait_t = randi(5)
pause(wait_t)
	urlwrite(B5URL, 'Tile_B05.jp2');
	wait_t = randi(5)
pause(wait_t)
	urlwrite(B8URL, 'Tile_B08.jp2');
	wait_t = randi(5)
pause(wait_t)
	urlwrite(B12URL, 'Tile_B12.jp2');
	wait_t = randi(5)
pause(wait_t)
	urlwrite(TCIURL, 'Tile_TCI.jp2');
%       imageData = imread(imgFileName);
        imageData = 'done'
        return
catch
        imageData = 'failed due to HTTP Error'
        %imageData = strcat(UID,"failed4")
        return
end
end
