I had thought about just making this return an int like the other functions near this one, but the output is never used, so I opted for the "simpler" change.