make conn & cursor as global

....