added database access