able to edit queries #5 , handle connection error better, some minor things