private PDFEntryHolder findEntryHolder(PDFEntryHolder pdfEntryHolderSearch, PDFPageHolder pdfPageHolder)
	{
		boolean bestIsMalformed = false;
		float bestCoverage = 0f;
		PDFEntryHolder bestEntryHolder = null;
		
		for (PDFEntryHolder pdfEntryHolder : pdfPageHolder.getElements())
		{
			if(pdfEntryHolderSearch.getClass() != pdfEntryHolder.getClass())
				continue;
			
			// check if one of the elements is broken
			boolean isMalformed = isMalformedTextHolder(pdfEntryHolderSearch, pdfEntryHolder);

			// how much does the elements cover each other
			float areaCoverage = calcAreaCoverage(pdfEntryHolderSearch, pdfEntryHolder, isMalformed);
			if(pdfEntryHolderSearch instanceof PDFTextHolder)
			{
				String searchText = ((PDFTextHolder)pdfEntryHolderSearch).getText();
				String text = ((PDFTextHolder)pdfEntryHolder).getText();
				
				// is the text the same
				if(!searchText.equalsIgnoreCase(text))
					areaCoverage = 0.0f;
			}	
			
			// check if the element is cut by the page borders
			if(horziontalPositionFromElementInPage(pdfEntryHolder, pdfPageHolder) !=
					horziontalPositionFromElementInPage(pdfEntryHolderSearch, pdfPageHolder))
				areaCoverage = 0.0f;
			
			// remember the best element 
			if(bestCoverage < areaCoverage)
			{
				bestCoverage = areaCoverage;
				bestEntryHolder = pdfEntryHolder;
				bestIsMalformed = isMalformed;
			}
		}
		
		// check if the result is within the requirements
		if(!hasSufficientSimilarity(bestCoverage, bestEntryHolder, bestIsMalformed))
			bestEntryHolder = null;
			
		return bestEntryHolder;
	}