refactored vector