reset db on end