Use vector instead of array