made the class selection buttons work