add 3 api and test code