add some input check and value get/set logic