updated the database and the api handler