added adapter for database