refactorize vector class methods
refactorize vector class methods