add edit dis function and add gtest for unitest