- added method to save the database