add generator support for constructors