add some function and test