added database initialization part