added a disconnect function in Database class