made db connection a class variable instead of an instance var.