used a vector instead of a map, and use shown member instead of width