added database stuff