Database connection and datbase retrieving functions added