add set function and some test cases