use improved lmdb api