added support for defining classes.