added database and file handler implementation