made the database interface a class2