add tests on vector
refactoring on region