added database stuffs