use const for vector length