added database destruction