added database loading