added support for class constructor