add closeDatabase method