update this.render() to a generator fn. Closes #21