script was optimized (search all elements which includes image contains in one function) don't need check repeating elements because we add elements to array only if it doesn't exist there. added hashMap which contains key=url of image and value=GUID (in the attribute)