add getValue method and onchange event