add forgotten file which implements writeToDisk() and restoreIntoDB()