use const for input vector