selected class now applied properly