added DBAdapter class