Similarly rewrote wc to use loop.