updated and reset db