use generator delegation

generator delegation is more efficient than co.