set conn and cur as class attributes