add new functions to api
api and wrapper modified