I don't understand why you changed values to a vector. Can there really be several elements?