add condition to use this resolver to reduce the useless searches
remove unnecessary comments