Added the database api, still need to connect it to the code