it'd be nice to define this outside the for loop, since it has only two variables