implemented DatabaseHandler class to manage persistent data