improved ability to add classes on the fly