use vector to set attributes