change to 1D vector, fix getter and setter