added several methods for DB connection