add needed function to api