use vector instead of list