setting up more robust db system