added initialization of database (if necessary)