adding corrected class links logic