relevance caclulation