Updated for multiple classes