created a global variable selectedClass to store currently selected
class name