added functionality to Database.cpp