make all the API functions working properly.