better streaming mode
add bdb format