changed vector iterators from unsigned into to std::vector::size_type