don't use std::distance considering we're already interating the range, if they're not rnd access interators the complexity isn't constant