might be nice to name these variables differently, to make their meaning more explicit