support for the class attribute on creation