made getValuesArray() work properly