use local variable for vector size