work in progress: need to fix setting up bdb environment