adding db_connector() function.