added functions to add to the databse