Adding db class and getcrediantial method