implemented iterators and started an eager transformed, worked out some of theory behind the rewriting