readds database dispose method that was accidentally deleted.