modifies some code in leveldb-7