Added check_relevancy to tool.py