making relevant tags calculation faster