also, minor nit: maybe consider inlining this into the for loop.