always use in memory db, read/flush at start/end