added support for virtual class methods