added support for multiple classes