Update setValue and addValue to allow number as value

  - update code
  - udpate test