tiny refactoring; use Boost.Range