added database integration