creating functions within our database class