add supporting of generator objects