added new functions in zandb.cpp