add support for enclosed classes