more const_iterator code moved to header file