generators OO-style, now all pass tests