added support for inheritance