change the vector size automatically