bind each to `g` instead of `rect`