database and error handler
database and error handler