since that adds a lot of complexity, maybe a fourth argument `int checkExists` would be better?  Does it get called from anywhere it doesn't need to check?